package com.koron.operation.classes.schedule.bean.dto;

import com.koron.operation.classes.info.bean.po.ClassesItem;
import com.koron.operation.classes.schedule.bean.po.ClassesSchedule;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.ArrayList;
import java.util.List;

/**
 * @author jzp
 * @since 2021/10/20
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class ClassesScheduleDTO extends ClassesSchedule {
    @ApiModelProperty("班别列表")
    private List<ClassesItem> items;

    @ApiModelProperty("排班明细")
    private List<ClassesShiftDTO> shifts;

    public List<ClassesShiftDTO> getNoNullShifts() {
        if (shifts == null) {
            return new ArrayList<>();
        }
        return shifts;
    }

}
